#pragma once

#include <communityui.h>

class Connection;
class CommunityInterface : public Optra::ZoneInterface
{
    Q_OBJECT
    Q_PROPERTY(bool connected READ isConnected);

public:
    CommunityInterface(void);
    virtual ~CommunityInterface(void);

protected:
    Optra::ZoneInfo* zoneInfo();
    bool initialize();
    bool configure(bool read);
    void unload();
    void launch();

signals:
    void communityReady();

private slots:
    void connectionReady();
    void manualConnection();

private:
    bool isConnected()const;
    bool connected_;

    Connection* conn_;
    CommunityUI *ui_;

    Optra::ZoneInfo* info_;
};
